var a = getApp(),
  t = require("../../../../utils/wxParse.js");

Page({
  data: {
    img: "https://6a69-jin5201-a4503e-1257013711.tcb.qcloud.la/collect1.png?sign=87faab1d6dccba04de4342c65cee1ba6&t=1572515643",
    text: "#3b4ca9;",
    color: "#3b4ca9",
    click: "click",
    like: "赞",
    click1: "click1",
    sharetext1: ""
  },
  click: function (t) {
    var e = this;
    wx.showLoading({
      title: "加载中...",
      mask: !0
    }), wx.request({
      url: a.globalData.dic + "doctor/education/educationVote/" + e.data.token + "/" + e.data.eduid,
      success: function (a) {
        console.log(a.data.code), 200 == a.data.code && (e.setData({
          text: "#ccc;",
          color: "#ccc",
          click: "",
          like: "已赞",
          praiseNum: e.data.praiseNum + 1
        }), wx.setStorageSync("praiseNum", 1)), wx.hideLoading();
      }
    });
  },
  particulars: function (e) {
    var c = this,
      o = [];
    c.setData({
      title: '宣传片',
      releaseDayTime: '2018-10-23',
      nmType: '小花',
      eduType: 2,
      contentFormat: '药到病除',
      sharetext1: 100,
      pageView: 10,
      praiseNum: 12,
      like: 9,
      imgUrl: "/assets/images/yanjing.png",
      collectAuthor: '老王',
      doctorTitle: '2018-10-23',
      nmHospital: '双手赞成',
      articleNum: 2,
      viewSumAll: 3,
      praiseSumAll: 4,
      shareSumAll: 5
    })
  },
  onLoad: function (a) {
    var t = this,
      e = wx.getStorageSync("eduid") || "",
      c = wx.getStorageSync("log") || "";
    wx.setStorageSync("pageView", 1), t.setData({
      eduid: e,
      token: c
    }), t.particulars();
  },
  onShow: function () { },
  videoError: function () {
    wx.showToast({
      title: "播放失败，请稍后重试",
      icon: "none",
      duration: 2e3
    });
  }
});